package com.appspot.diasporajava.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;


public interface GenericDao<T, ID extends Serializable> {
    /**
     * Method that returns the number of entries from a table that meet some
     * criteria (where clause params)
     *
     * @param params
     *            sql parameters
     * @return the number of records meeting the criteria
     */
    long countAll(Map params);

    T create(T t);

    void delete(ID id);

    T find(ID id);

    T update(T t); 
    
    List<T> list();
}